﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Region.cs" company="DissingNellemann">
//   
// All rights reserved </copyright>
// <summary>
//   The region.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace Website.Models.Domain
{
    using Website.Models.Base;

    /// <summary>
    ///     The region.
    /// </summary>
    public class Region : Entity
    {
        #region Public Properties

        /// <summary>
        ///     Gets or sets the additional information.
        /// </summary>
        public string AdditionalInformation { get; set; }

        /// <summary>
        ///     Gets or sets the country.
        /// </summary>
        public Country Country { get; set; }

        /// <summary>
        ///     Gets or sets the name.
        /// </summary>
        public string Name { get; set; }

        #endregion

        #region Public Methods and Operators

        /// <summary>
        /// The convert.
        /// </summary>
        /// <param name="dto">
        /// The dto.
        /// </param>
        /// <returns>
        /// The <see cref="Region"/>.
        /// </returns>
        public static Region Convert(CRUDServices.Region dto)
        {
            return new Region
            {
                ID = dto.ID,
                Name = dto.Name,
                AdditionalInformation = dto.AdditionalInformation,
                Country = Country.Convert(dto.Country)
            };
        }

        #endregion
    }
}